import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/inspec/inspec_query_plan_entity.dart';
import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';


InspecQueryPlanEntity $InspecQueryPlanEntityFromJson(Map<String, dynamic> json) {
  final InspecQueryPlanEntity inspecQueryPlanEntity = InspecQueryPlanEntity();
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    inspecQueryPlanEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    inspecQueryPlanEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    inspecQueryPlanEntity.createDate = createDate;
  }
  final int? currentExecution = jsonConvert.convert<int>(json['currentExecution']);
  if (currentExecution != null) {
    inspecQueryPlanEntity.currentExecution = currentExecution;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    inspecQueryPlanEntity.deleted = deleted;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    inspecQueryPlanEntity.id = id;
  }
  final List<String>? ids = (json['ids'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (ids != null) {
    inspecQueryPlanEntity.ids = ids;
  }
  final String? programmeName = jsonConvert.convert<String>(json['programmeName']);
  if (programmeName != null) {
    inspecQueryPlanEntity.programmeName = programmeName;
  }
  final int? remember = jsonConvert.convert<int>(json['remember']);
  if (remember != null) {
    inspecQueryPlanEntity.remember = remember;
  }
  final String? timeTaskIds = jsonConvert.convert<String>(json['timeTaskIds']);
  if (timeTaskIds != null) {
    inspecQueryPlanEntity.timeTaskIds = timeTaskIds;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    inspecQueryPlanEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    inspecQueryPlanEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    inspecQueryPlanEntity.updateDate = updateDate;
  }
  final String? userId = jsonConvert.convert<String>(json['userId']);
  if (userId != null) {
    inspecQueryPlanEntity.userId = userId;
  }
  final String? validityPeriodEndTime = jsonConvert.convert<String>(json['validityPeriodEndTime']);
  if (validityPeriodEndTime != null) {
    inspecQueryPlanEntity.validityPeriodEndTime = validityPeriodEndTime;
  }
  final String? validityPeriodStartTime = jsonConvert.convert<String>(json['validityPeriodStartTime']);
  if (validityPeriodStartTime != null) {
    inspecQueryPlanEntity.validityPeriodStartTime = validityPeriodStartTime;
  }
  final bool? isCheck = jsonConvert.convert<bool>(json['isCheck']);
  if (isCheck != null) {
    inspecQueryPlanEntity.isCheck = isCheck;
  }
  return inspecQueryPlanEntity;
}

Map<String, dynamic> $InspecQueryPlanEntityToJson(InspecQueryPlanEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['currentExecution'] = entity.currentExecution;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['ids'] = entity.ids;
  data['programmeName'] = entity.programmeName;
  data['remember'] = entity.remember;
  data['timeTaskIds'] = entity.timeTaskIds;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  data['userId'] = entity.userId;
  data['validityPeriodEndTime'] = entity.validityPeriodEndTime;
  data['validityPeriodStartTime'] = entity.validityPeriodStartTime;
  data['isCheck'] = entity.isCheck;
  return data;
}

extension InspecQueryPlanEntityExtension on InspecQueryPlanEntity {
  InspecQueryPlanEntity copyWith({
    String? createBy,
    String? createById,
    String? createDate,
    int? currentExecution,
    String? deleted,
    String? id,
    List<String>? ids,
    String? programmeName,
    int? remember,
    String? timeTaskIds,
    String? updateBy,
    String? updateById,
    String? updateDate,
    String? userId,
    String? validityPeriodEndTime,
    String? validityPeriodStartTime,
    bool? isCheck,
  }) {
    return InspecQueryPlanEntity()
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..currentExecution = currentExecution ?? this.currentExecution
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..ids = ids ?? this.ids
      ..programmeName = programmeName ?? this.programmeName
      ..remember = remember ?? this.remember
      ..timeTaskIds = timeTaskIds ?? this.timeTaskIds
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate
      ..userId = userId ?? this.userId
      ..validityPeriodEndTime = validityPeriodEndTime ?? this.validityPeriodEndTime
      ..validityPeriodStartTime = validityPeriodStartTime ?? this.validityPeriodStartTime
      ..isCheck = isCheck ?? this.isCheck;
  }
}
